package com.shenxuchen.crm.mapper;

import com.shenxuchen.crm.pojo.ClueActivity;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ClueActivityMapper {
    List getByClueIdWithActivity(String clueId);

    @Delete("delete from tbl_clue_activity_relation where clueId=#{clueId}")
    void delByClueId(String clueId);

    @Insert("insert into tbl_clue_activity_relation(clueId,activityId)  values(#{clueId},#{actId})")
    void add(@Param("clueId") String clueId, @Param("actId") String actId);

    @Delete("delete from tbl_clue_activity_relation where clueId=#{clueId} and activityId=#{actId}")
    void del(@Param("clueId") String clueId, @Param("actId") String actId);

    @Select("select * from tbl_clue_activity_relation where clueId=#{clueId}")
    List<ClueActivity> getByClueId(String clueId);
}
